#include "config.h"
#include <gtk/gtk.h>
+#include <glib/gi18n-lib.h>
#include "gtkbooleancellaccessible.h"
struct _GtkBooleanCellAccessiblePrivate
gint i)
{
if (i == 0)
- return "toggles the cell";
+ return C_("Action description", "Toggles the cell");
return parent_action_iface->get_description (action, i - 1);
}
return parent_action_iface->get_description (action, i - 1);
}
+static const gchar *
+gtk_boolean_cell_accessible_action_get_localized_name (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action name", "Toggle");
+
+ return parent_action_iface->get_description (action, i - 1);
+}
+
static gboolean
gtk_boolean_cell_accessible_do_action (AtkAction *action,
gint i)
{
if (i == 0)
return parent_action_iface->do_action (action, 2);
- else
- return parent_action_iface->do_action (action, i - 1);
+
+ return parent_action_iface->do_action (action, i - 1);
}
static void
iface->get_n_actions = gtk_boolean_cell_accessible_get_n_actions;
iface->get_description = gtk_boolean_cell_accessible_get_description;
iface->get_name = gtk_boolean_cell_accessible_action_get_name;
+ iface->get_localized_name = gtk_boolean_cell_accessible_action_get_localized_name;
}
#include <string.h>
#include <gtk/gtk.h>
+#include <glib/gi18n-lib.h>
#include "gtkbuttonaccessible.h"
gtk_button_accessible_action_get_name (AtkAction *action,
gint i)
{
- if (i != 0)
- return NULL;
+ if (i == 0)
+ return "click";
+ return NULL;
+}
+
+static const gchar *
+gtk_button_accessible_action_get_localized_name (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action name", "Click");
+ return NULL;
+}
- return "click";
+static const gchar *
+gtk_button_accessible_action_get_description (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action description", "Clicks the button");
+ return NULL;
}
static void
iface->get_n_actions = gtk_button_accessible_get_n_actions;
iface->get_keybinding = gtk_button_accessible_get_keybinding;
iface->get_name = gtk_button_accessible_action_get_name;
+ iface->get_localized_name = gtk_button_accessible_action_get_localized_name;
+ iface->get_description = gtk_button_accessible_action_get_description;
}
static const gchar *
#include "config.h"
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkcontainercellaccessible.h"
#include "gtkcellaccessibleprivate.h"
}
}
+static const gchar *
+gtk_cell_accessible_action_get_localized_name (AtkAction *action,
+ gint index)
+{
+ switch (index)
+ {
+ case 0:
+ return C_("Action name", "Expand or contract");
+ case 1:
+ return C_("Action name", "Edit");
+ case 2:
+ return C_("Action name", "Activate");
+ default:
+ return NULL;
+ }
+}
+
static const gchar *
gtk_cell_accessible_action_get_description (AtkAction *action,
gint index)
switch (index)
{
case 0:
- return "expands or contracts the row in the tree view containing this cell";
+ return C_("Action description", "Expands or contracts the row in the tree view containing this cell");
case 1:
- return "creates a widget in which the contents of the cell can be edited";
+ return C_("Action description", "Creates a widget in which the contents of the cell can be edited");
case 2:
- return "activate the cell";
+ return C_("Action description", "Activates the cell");
default:
return NULL;
}
iface->get_n_actions = gtk_cell_accessible_action_get_n_actions;
iface->do_action = gtk_cell_accessible_action_do_action;
iface->get_name = gtk_cell_accessible_action_get_name;
+ iface->get_localized_name = gtk_cell_accessible_action_get_localized_name;
iface->get_description = gtk_cell_accessible_action_get_description;
iface->get_keybinding = gtk_cell_accessible_action_get_keybinding;
}
#include "config.h"
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkcolorswatchaccessibleprivate.h"
}
}
+static const gchar *
+gtk_color_swatch_accessible_get_localized_name (AtkAction *action,
+ gint i)
+{
+ switch (i)
+ {
+ case 0: return C_("Action name", "Select");
+ case 1: return C_("Action name", "Activate");
+ case 2: return C_("Action name", "Customize");
+ default: return NULL;
+ }
+}
+
+static const gchar *
+gtk_color_swatch_accessible_get_description (AtkAction *action,
+ gint i)
+{
+ switch (i)
+ {
+ case 0: return C_("Action description", "Selects the color");
+ case 1: return C_("Action description", "Activates the color");
+ case 2: return C_("Action description", "Customizes the color");
+ default: return NULL;
+ }
+}
+
static gboolean
gtk_color_swatch_accessible_do_action (AtkAction *action,
gint i)
iface->get_n_actions = gtk_color_swatch_accessible_get_n_actions;
iface->get_keybinding = gtk_color_swatch_accessible_get_keybinding;
iface->get_name = gtk_color_swatch_accessible_get_name;
+ iface->get_localized_name = gtk_color_swatch_accessible_get_localized_name;
+ iface->get_description = gtk_color_swatch_accessible_get_description;
}
#include "config.h"
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkcomboboxaccessible.h"
gtk_combo_box_accessible_action_get_name (AtkAction *action,
gint i)
{
- if (i != 0)
- return NULL;
+ if (i == 0)
+ return "press";
+ return NULL;
+}
+
+static const gchar *
+gtk_combo_box_accessible_action_get_localized_name (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action name", "Press");
+ return NULL;
+}
- return "press";
+static const gchar *
+gtk_combo_box_accessible_action_get_description (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action description", "Presses the combobox");
+ return NULL;
}
static void
iface->get_n_actions = gtk_combo_box_accessible_get_n_actions;
iface->get_keybinding = gtk_combo_box_accessible_get_keybinding;
iface->get_name = gtk_combo_box_accessible_action_get_name;
+ iface->get_localized_name = gtk_combo_box_accessible_action_get_localized_name;
+ iface->get_description = gtk_combo_box_accessible_action_get_description;
}
static gboolean
#include "config.h"
+#include <glib/gi18n-lib.h>
#include <string.h>
#include <gtk/gtk.h>
#include "gtkpango.h"
gtk_entry_accessible_action_get_name (AtkAction *action,
gint i)
{
- if (i != 0)
- return NULL;
+ if (i == 0)
+ return "activate";
+ return NULL;
+}
- return "activate";
+static const gchar*
+gtk_entry_accessible_action_get_localized_name (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action name", "Activate");
+ return NULL;
+}
+
+static const gchar*
+gtk_entry_accessible_action_get_description (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action description", "Activates the entry");
+ return NULL;
}
static void
iface->get_n_actions = gtk_entry_accessible_get_n_actions;
iface->get_keybinding = gtk_entry_accessible_get_keybinding;
iface->get_name = gtk_entry_accessible_action_get_name;
+ iface->get_localized_name = gtk_entry_accessible_action_get_localized_name;
+ iface->get_description = gtk_entry_accessible_action_get_description;
}
#include "config.h"
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkexpanderaccessible.h"
gtk_expander_accessible_action_get_name (AtkAction *action,
gint i)
{
- if (i != 0)
- return NULL;
+ if (i == 0)
+ return "activate";
+ return NULL;
+}
- return "activate";
+static const gchar *
+gtk_expander_accessible_action_get_localized_name (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action name", "Activate");
+ return NULL;
+}
+
+static const gchar *
+gtk_expander_accessible_action_get_description (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action description", "Activates the expander");
+ return NULL;
}
static void
iface->get_n_actions = gtk_expander_accessible_get_n_actions;
iface->get_keybinding = gtk_expander_accessible_get_keybinding;
iface->get_name = gtk_expander_accessible_action_get_name;
+ iface->get_localized_name = gtk_expander_accessible_action_get_localized_name;
+ iface->get_description = gtk_expander_accessible_action_get_description;
}
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+
+#include <glib/gi18n-lib.h>
#include <string.h>
#include <gtk/gtk.h>
#include "gtkmenuitemaccessible.h"
gtk_menu_item_accessible_action_get_name (AtkAction *action,
gint i)
{
- if (i != 0 || gtk_menu_item_accessible_get_n_actions (action) == 0)
- return NULL;
+ if (i == 0 && gtk_menu_item_accessible_get_n_actions (action) > 0)
+ return "click";
+ return NULL;
+}
+
+static const gchar *
+gtk_menu_item_accessible_action_get_localized_name (AtkAction *action,
+ gint i)
+{
+ if (i == 0 && gtk_menu_item_accessible_get_n_actions (action) > 0)
+ return C_("Action name", "Click");
+ return NULL;
+}
- return "click";
+static const gchar *
+gtk_menu_item_accessible_action_get_description (AtkAction *action,
+ gint i)
+{
+ if (i == 0 && gtk_menu_item_accessible_get_n_actions (action) > 0)
+ return C_("Action description", "Clicks the menuitem");
+ return NULL;
}
static gboolean
iface->do_action = gtk_menu_item_accessible_do_action;
iface->get_n_actions = gtk_menu_item_accessible_get_n_actions;
iface->get_name = gtk_menu_item_accessible_action_get_name;
+ iface->get_localized_name = gtk_menu_item_accessible_action_get_localized_name;
+ iface->get_description = gtk_menu_item_accessible_action_get_description;
iface->get_keybinding = gtk_menu_item_accessible_get_keybinding;
}
#include <config.h>
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkscalebuttonaccessible.h"
gtk_scale_button_accessible_get_description (AtkAction *action,
gint i)
{
- return NULL;
+ switch (i)
+ {
+ case 0:
+ return C_("Action description", "Pops up the slider");
+ case 1:
+ return C_("Action description", "Dismisses the slider");
+ default:
+ return NULL;
+ }
}
static const gchar *
}
}
+static const gchar *
+gtk_scale_button_accessible_action_get_localized_name (AtkAction *action,
+ gint i)
+{
+ switch (i)
+ {
+ case 0:
+ return C_("Action name", "Popup");
+ case 1:
+ return C_("Action name", "Dismiss");
+ default:
+ return NULL;
+ }
+}
+
static void
atk_action_interface_init (AtkActionIface *iface)
{
iface->get_n_actions = gtk_scale_button_accessible_get_n_actions;
iface->get_description = gtk_scale_button_accessible_get_description;
iface->get_name = gtk_scale_button_accessible_action_get_name;
+ iface->get_localized_name = gtk_scale_button_accessible_action_get_localized_name;
}
static void
#include "config.h"
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gtkintl.h"
#include "gtkswitchaccessible.h"
gtk_switch_action_get_name (AtkAction *action,
gint i)
{
- if (i != 0)
- return NULL;
+ if (i == 0)
+ return "toggle";
+ return NULL;
+}
+
+static const gchar *
+gtk_switch_action_get_localized_name (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action name", "Toggle");
+ return NULL;
+}
- return "toggle";
+static const gchar *
+gtk_switch_action_get_description (AtkAction *action,
+ gint i)
+{
+ if (i == 0)
+ return C_("Action description", "Toggles the switch");
+ return NULL;
}
static gboolean
iface->do_action = gtk_switch_action_do_action;
iface->get_n_actions = gtk_switch_action_get_n_actions;
iface->get_name = gtk_switch_action_get_name;
+ iface->get_localized_name = gtk_switch_action_get_localized_name;
+ iface->get_description = gtk_switch_action_get_description;
}